package team.gs.model;

import org.andengine.engine.handler.physics.PhysicsHandler;
import org.andengine.entity.text.Text;
import org.andengine.opengl.font.IFont;
import org.andengine.opengl.vbo.VertexBufferObjectManager;

public abstract class TextObject extends Text {
	public PhysicsHandler mPhysicsHandler;

	public TextObject(float pX, float pY, IFont pFont, CharSequence pText,
			int pCharactersMaximum,
			VertexBufferObjectManager pVertexBufferObjectManager) {
		super(pX, pY, pFont, pText, pCharactersMaximum,
				pVertexBufferObjectManager);
		this.mPhysicsHandler = new PhysicsHandler(this);
		this.registerUpdateHandler(this.mPhysicsHandler);
	}

	@Override
	protected void onManagedUpdate(float pSecondsElapsed) {
		action();
		super.onManagedUpdate(pSecondsElapsed);
	}

	public abstract void action();
}
